package nancal.mp.db.mongo.table

import java.io.*
import nbcp.base.db.*
import nbcp.base.comm.*
import nbcp.base.extend.*
import nbcp.base.enums.*
import nbcp.base.utils.*
import nbcp.myoql.db.*
import nbcp.myoql.db.comm.*
import nbcp.myoql.db.enums.*
import nbcp.myoql.db.mongo.*
import nbcp.myoql.db.mongo.base.*
import nbcp.myoql.db.mongo.component.*
import org.slf4j.LoggerFactory
import org.springframework.stereotype.*



@org.springframework.data.mongodb.core.mapping.Document()
@nbcp.base.db.annotation.DbEntityGroup(value = """dev""")
@nbcp.base.db.annotation.DbEntityIndexes(value = arrayOf(nbcp.base.db.annotation.DbEntityIndex(value = arrayOf("""createAt"""))))
class JenkinsLogMeta(private val parentPropertyName: String): MongoColumnName() {
    constructor(value: MongoColumnName) : this(value.toString()) {}
    val id = mongoColumnJoin(this.parentPropertyName, "_id")
    val status = mongoColumnJoin(this.parentPropertyName, "status")
    val stages = JenkinsLogItemDataMeta(mongoColumnJoin(this.parentPropertyName, "stages"))
    val gitData = GitDataMeta(mongoColumnJoin(this.parentPropertyName, "gitData"))
    val sourceData = SourceDataMeta(mongoColumnJoin(this.parentPropertyName, "sourceData"))
    val buildInfo = JenkinsBuildInfoMeta(mongoColumnJoin(this.parentPropertyName, "buildInfo"))
    val buildVersion = JenkinsBuildDetailInfoMeta(mongoColumnJoin(this.parentPropertyName, "buildVersion"))
    val createBy = IdNameMeta(mongoColumnJoin(this.parentPropertyName, "createBy"))
    /**
     * 创建时间
     */
    @nbcp.base.db.annotation.Cn(value = """创建时间""")
    val createAt = mongoColumnJoin(this.parentPropertyName, "createAt")
    /**
     * 更新时间
     */
    @nbcp.base.db.annotation.Cn(value = """更新时间""")
    val updateAt = mongoColumnJoin(this.parentPropertyName, "updateAt")
    override fun toString(): String {
        return mongoColumnJoin(this.parentPropertyName).toString()
    }
}

